# _*_ encoding:utf-8 _*_

from rest_framework.generics import ListAPIView, CreateAPIView

from meiduo_admin.serializers.user_serializers import UserModelSerializer
from users.models import User
from meiduo_admin.paginations import MyPage
from meiduo_mall.utils.django_drf_filter import get_filter


class UserView(ListAPIView, CreateAPIView):

    queryset = User.objects.all()
    serializer_class = UserModelSerializer
    pagination_class = MyPage
    filter_class = get_filter(User, 'username')  # 指定过滤器






